import request from '@/config/axios'

// 用户对话分组 VO
export interface UserDialogueGroupVO {
  id: number // 分组编号
  name: string // 分组名称
}

// 用户对话分组 API
export const UserDialogueGroupApi = {
  // 查询用户对话分组分页
  getUserDialogueGroupPage: async (params: any) => {
    return await request.get({ url: `/blog/user-dialogue-group/page`, params })
  },

  // 查询用户对话分组详情
  getUserDialogueGroup: async (id: number) => {
    return await request.get({ url: `/blog/user-dialogue-group/get?id=` + id })
  },

  // 新增用户对话分组
  createUserDialogueGroup: async (data: UserDialogueGroupVO) => {
    return await request.post({ url: `/blog/user-dialogue-group/create`, data })
  },

  // 修改用户对话分组
  updateUserDialogueGroup: async (data: UserDialogueGroupVO) => {
    return await request.put({ url: `/blog/user-dialogue-group/update`, data })
  },

  // 删除用户对话分组
  deleteUserDialogueGroup: async (id: number) => {
    return await request.delete({ url: `/blog/user-dialogue-group/delete?id=` + id })
  },

  // 导出用户对话分组 Excel
  exportUserDialogueGroup: async (params) => {
    return await request.download({ url: `/blog/user-dialogue-group/export-excel`, params })
  },
}